from ..models.currency import Currency


class CurrencyService(object):
    @classmethod
    def get_main_currency(cls):
        return Currency.query.filter(Currency.type == Currency.TYPE_MAIN).first()

    @classmethod
    def get_currency_by_id(cls, id):
        return Currency.query.filter(Currency.id == id).first()
